﻿using Mini.Model.BaseModels;

namespace Mini.Common
{
   public static class ConvertHelper
    {
       public static FolderType ConvertTagTypeToFolderType(TagType tagType)
        {
            switch (tagType)
            {
                case TagType.Link:
                    return FolderType.Css;
                case TagType.Script:
                    return FolderType.Scripts;
                default:
                    return FolderType.Images;
            }
        }

       public static string ConvertTagTypeToFolderTypeString(TagType tagType)
        {
            var folderType = ConvertTagTypeToFolderType(tagType);
            return ConvertFolderTypeToString(folderType);
        }

       public static string ConvertFolderTypeToString(FolderType folderType)
        {
            return folderType.ToString().ToLower();
        }
    }
}
